<!--
 * @Description:
 * @Author bianpengfei
 * @create 2021/3/14 21:19
 -->
<template>
  <div class="ant-loading">
    <div class="ant-spin-dot ant-spin-dot-spin"><i></i><i></i><i></i><i></i></div>
  </div>
</template>

<script>
export default {
  name: 'ant-loading'
}
</script>

<style scoped lang="less">
.ant-loading {
  width: 84px;
  height: 84px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4000;
}
.ant-spin-dot {
  position: relative;
  display: inline-block;
  font-size: 32px;
  width: 32px;
  height: 32px;
  background: transparent;
}
.ant-spin-dot-spin {
  transform: rotate(45deg);
  animation: antRotate 1.2s infinite linear;
}

.ant-spin-dot i {
  width: 14px;
  height: 14px;
  border-radius: 100%;
  background-color: @primary-color;
  transform: scale(0.75);
  display: block;
  position: absolute;
  opacity: 0.4;
  animation: antSpinMove 1s infinite linear alternate;
  transform-origin: 50% 50%;
  &:nth-child(1) {
    left: 0;
    top: 0;
  }
  &:nth-child(2) {
    right: 0;
    top: 0;
    animation-delay: 0.4s;
  }
  &:nth-child(3) {
    right: 0;
    bottom: 0;
    animation-delay: 0.8s;
  }
  &:nth-child(4) {
    left: 0;
    bottom: 0;
    animation-delay: 1.2s;
  }
}
@keyframes antSpinMove {
  to {
    opacity: 1;
  }
}
@keyframes antRotate {
  to {
    transform: rotate(405deg);
  }
}
</style>
